Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(interactive): Template the runtime module #4293

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

zhanglei1949
Copy link
Collaborator

@zhanglei1949 zhanglei1949 commented Oct 17, 2024

Template the runtime module. This PR includes changes of two kinds

  • Make the runtime module header only.
  • Make the classes and functions which access graph data template.

TODO:

We expose the Graph Interface via the following template class. Note this template's function are only defined, no implementation is provided.

template <typename GRAPH_IMPL>
class GraphInterface {
 public:
  using label_id_t = label_t;
  using vertex_index_t = typename GRAPH_IMPL::vertex_index_t;
  using edge_iterator_t = impl::EdgeIterator<GRAPH_IMPL>;

  template <typename EDATA_T>
  using sub_graph_t = impl::SubGraph<EDATA_T, GRAPH_IMPL>;

  label_id_t VertexLabelNum();
  label_id_t EdgeLabelNum() const;
  std::vector<label_id_t> GetVertexLabels() const;
  std::vector<label_id_t> GetEdgeLabels() const;
  label_id_t GetVertexLabelId(const std::string& label) const;
};

We specialize the template class for ReadTransaction. In this PR, we don't refactor the interface, we adapt almost the same interface as ReadTransaction.

Committed-by: xiaolei.zl from Dev container
…aph-interface

Committed-by: xiaolei.zl from Dev container
Committed-by: xiaolei.zl from Dev container
Copy link
Contributor

Please check the preview of the documentation changes at
https://52e47196.graphscope-docs-preview.pages.dev

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.78%. Comparing base (0aa119e) to head (81eefa4).
Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #4293       +/-   ##
===========================================
+ Coverage   36.96%   58.78%   +21.82%     
===========================================
  Files         126       12      -114     
  Lines       13235      592    -12643     
===========================================
- Hits         4892      348     -4544     
+ Misses       8343      244     -8099     

see 114 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0aa119e...81eefa4. Read the comment docs.

@zhanglei1949 zhanglei1949 marked this pull request as draft October 18, 2024 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants